package cn.jsp;

import com.zaxxer.hikari.HikariDataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan("cn.jsp")
public class JavaConfig {
    @Bean
    public HikariDataSource dataSource(){
        HikariDataSource dataSource=new HikariDataSource();
        dataSource.setDriverClassName("org.hsqldb.jdbc.JDBCDriver");
        dataSource.setJdbcUrl("jdbc:hsqldb:hsql://localhost/");
        dataSource.setUsername("sa");
        dataSource.setPassword("");
        return  dataSource;
    }


}
